﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Utils.ContentManagement;
using Microsoft.Xna.Framework.Audio;

namespace Utils.Audio
{
    public class SoundManager
    {
        ContentLoader loader;
        string domain;
        float masterVolume;
        List<Sound> sounds = new List<Sound>();

        public SoundManager(ContentLoader loader, string domain, float masterVolume)
        {
            this.loader = loader;
            this.domain = domain;
            this.masterVolume = masterVolume;
        }

        public Sound LoadSound(string name, int instances)
        {
            Sound sound = new Sound(loader.Load<SoundEffect>(domain + name), instances, masterVolume);
            sounds.Add(sound);
            return sound;
        }
    }
}
